
import 'package:flutter/services.dart';

class MyRecognitionQrcode {
  static const MethodChannel _channel =
  MethodChannel('recognition_qrcode');

  static Future<String> get platformVersion async {
    final String version = await _channel.invokeMethod('getPlatformVersion');
    return version;
  }

  // base64 || url || file path
  static Future<Map> recognition(dynamic img) async {
    try{
      var result = await _channel.invokeMethod('recognitionQrcode', img);
      return result;
    } catch(e) {
      return {"path":img, "value": ""};
    }
  }
}